using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class SwitchPushMailRequest : GeneratedMessageLite<SwitchPushMailRequest, SwitchPushMailRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<SwitchPushMailRequest, SwitchPushMailRequest.Builder>
		{
			private bool resultIsReadOnly;
			private SwitchPushMailRequest result;
			protected override SwitchPushMailRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override SwitchPushMailRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override SwitchPushMailRequest DefaultInstanceForType
			{
				get
				{
					return SwitchPushMailRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public uint SwitchValue
			{
				get
				{
					return this.result.SwitchValue;
				}
				set
				{
					this.SetSwitchValue(value);
				}
			}
			public string SecPwdMd5
			{
				get
				{
					return this.result.SecPwdMd5;
				}
				set
				{
					this.SetSecPwdMd5(value);
				}
			}
			public Builder()
			{
				this.result = SwitchPushMailRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(SwitchPushMailRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private SwitchPushMailRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					SwitchPushMailRequest other = this.result;
					this.result = new SwitchPushMailRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override SwitchPushMailRequest.Builder Clear()
			{
				this.result = SwitchPushMailRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override SwitchPushMailRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new SwitchPushMailRequest.Builder(this.result);
				}
				return new SwitchPushMailRequest.Builder().MergeFrom(this.result);
			}
			public override SwitchPushMailRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override SwitchPushMailRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is SwitchPushMailRequest)
				{
					return this.MergeFrom((SwitchPushMailRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override SwitchPushMailRequest.Builder MergeFrom(SwitchPushMailRequest other)
			{
				return this;
			}
			public override SwitchPushMailRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override SwitchPushMailRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(SwitchPushMailRequest._switchPushMailRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = SwitchPushMailRequest._switchPushMailRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasSwitchValue = input.ReadUInt32(ref this.result.switchValue_);
							continue;
						}
						if (num3 == 26u)
						{
							this.result.hasSecPwdMd5 = input.ReadString(ref this.result.secPwdMd5_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public SwitchPushMailRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public SwitchPushMailRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public SwitchPushMailRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public SwitchPushMailRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public SwitchPushMailRequest.Builder SetSwitchValue(uint value)
			{
				this.PrepareBuilder();
				this.result.hasSwitchValue = true;
				this.result.switchValue_ = value;
				return this;
			}
			public SwitchPushMailRequest.Builder ClearSwitchValue()
			{
				this.PrepareBuilder();
				this.result.hasSwitchValue = false;
				this.result.switchValue_ = 0u;
				return this;
			}
			public SwitchPushMailRequest.Builder SetSecPwdMd5(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasSecPwdMd5 = true;
				this.result.secPwdMd5_ = value;
				return this;
			}
			public SwitchPushMailRequest.Builder ClearSecPwdMd5()
			{
				this.PrepareBuilder();
				this.result.hasSecPwdMd5 = false;
				this.result.secPwdMd5_ = "";
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int SwitchValueFieldNumber = 2;
		public const int SecPwdMd5FieldNumber = 3;
		private static readonly SwitchPushMailRequest defaultInstance;
		private static readonly string[] _switchPushMailRequestFieldNames;
		private static readonly uint[] _switchPushMailRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasSwitchValue;
		private uint switchValue_;
		private bool hasSecPwdMd5;
		private string secPwdMd5_ = "";
		private int memoizedSerializedSize = -1;
		public static SwitchPushMailRequest DefaultInstance
		{
			get
			{
				return SwitchPushMailRequest.defaultInstance;
			}
		}
		public override SwitchPushMailRequest DefaultInstanceForType
		{
			get
			{
				return SwitchPushMailRequest.DefaultInstance;
			}
		}
		protected override SwitchPushMailRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public uint SwitchValue
		{
			get
			{
				return this.switchValue_;
			}
		}
		public string SecPwdMd5
		{
			get
			{
				return this.secPwdMd5_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.hasSwitchValue && this.BaseRequest.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasSwitchValue)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.SwitchValue);
				}
				if (this.hasSecPwdMd5)
				{
					num += CodedOutputStream.ComputeStringSize(3, this.SecPwdMd5);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private SwitchPushMailRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] switchPushMailRequestFieldNames = SwitchPushMailRequest._switchPushMailRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, switchPushMailRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasSwitchValue)
			{
				output.WriteUInt32(2, switchPushMailRequestFieldNames[2], this.SwitchValue);
			}
			if (this.hasSecPwdMd5)
			{
				output.WriteString(3, switchPushMailRequestFieldNames[1], this.SecPwdMd5);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasSwitchValue)
			{
				num ^= this.switchValue_.GetHashCode();
			}
			if (this.hasSecPwdMd5)
			{
				num ^= this.secPwdMd5_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			SwitchPushMailRequest switchPushMailRequest = value as SwitchPushMailRequest;
			return switchPushMailRequest != null && (this.hasBaseRequest == switchPushMailRequest.hasBaseRequest && (!this.hasBaseRequest || this.baseRequest_.Equals(switchPushMailRequest.baseRequest_))) && (this.hasSwitchValue == switchPushMailRequest.hasSwitchValue && (!this.hasSwitchValue || this.switchValue_.Equals(switchPushMailRequest.switchValue_))) && (this.hasSecPwdMd5 == switchPushMailRequest.hasSecPwdMd5 && (!this.hasSecPwdMd5 || this.secPwdMd5_.Equals(switchPushMailRequest.secPwdMd5_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<SwitchPushMailRequest, SwitchPushMailRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<SwitchPushMailRequest, SwitchPushMailRequest.Builder>.PrintField("SwitchValue", this.hasSwitchValue, this.switchValue_, writer);
			GeneratedMessageLite<SwitchPushMailRequest, SwitchPushMailRequest.Builder>.PrintField("SecPwdMd5", this.hasSecPwdMd5, this.secPwdMd5_, writer);
		}
		public static SwitchPushMailRequest ParseFrom(byte[] data)
		{
			return SwitchPushMailRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private SwitchPushMailRequest MakeReadOnly()
		{
			return this;
		}
		public static SwitchPushMailRequest.Builder CreateBuilder()
		{
			return new SwitchPushMailRequest.Builder();
		}
		public override SwitchPushMailRequest.Builder ToBuilder()
		{
			return SwitchPushMailRequest.CreateBuilder(this);
		}
		public override SwitchPushMailRequest.Builder CreateBuilderForType()
		{
			return new SwitchPushMailRequest.Builder();
		}
		public static SwitchPushMailRequest.Builder CreateBuilder(SwitchPushMailRequest prototype)
		{
			return new SwitchPushMailRequest.Builder(prototype);
		}
		static SwitchPushMailRequest()
		{
			SwitchPushMailRequest.defaultInstance = new SwitchPushMailRequest().MakeReadOnly();
			SwitchPushMailRequest._switchPushMailRequestFieldNames = new string[]
			{
				"BaseRequest",
				"SecPwdMd5",
				"SwitchValue"
			};
			SwitchPushMailRequest._switchPushMailRequestFieldTags = new uint[]
			{
				10u,
				26u,
				16u
			};
			object.ReferenceEquals(micromsg.Proto.SwitchPushMailRequest.Descriptor, null);
		}
	}
}
